package com.zlq.Top;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class TopSen {
    @Resource
    private AmqpTemplate amqpTemplate;
    public void send1() {
        String context = "我输出message单数";
        amqpTemplate.convertAndSend("exchange", "topic.message", context);
    }

    public void send2() {
        String context = "我输出messages复数";
        amqpTemplate.convertAndSend("exchange", "topic.messages", context);
    }
}
